package com.youmu.sichuansfc.domain;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "youmu_file", schema = "youmu", catalog = "")
public class YoumuFile {
    private Long id;
    private Date addTime;
    private String url;
    private String name;
    private boolean isDelete;
    private Long notifyId;

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "add_time")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "url")
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "is_delete")
    public boolean isDelete() {
        return isDelete;
    }

    public void setDelete(boolean delete) {
        isDelete = delete;
    }

    @Basic
    @Column(name = "notify_id")
    public Long getNotifyId() {
        return notifyId;
    }

    public void setNotifyId(Long notifyId) {
        this.notifyId = notifyId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YoumuFile youmuFile = (YoumuFile) o;
        return id == youmuFile.id &&
                isDelete == youmuFile.isDelete &&
                Objects.equals(addTime, youmuFile.addTime) &&
                Objects.equals(url, youmuFile.url) &&
                Objects.equals(name, youmuFile.name) &&
                Objects.equals(notifyId, youmuFile.notifyId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, addTime, url, name, isDelete, notifyId);
    }
}
